//===============================================================================
// Microsoft patterns & practices Enterprise Library Contribution
// Query Application Block
//===============================================================================

using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using EntLibContrib.Query.Configuration;

namespace EntLibContrib.Query
{
	/// <summary>
	/// Parameter Set.
	/// </summary>
	/// <remarks>
	/// This provider handles the parameters
	/// </remarks>
	[ConfigurationElementType(typeof(ParameterSetData))]
	public class ParameterSet : IParameterSet
	{
		#region Fields
		private readonly ParameterDictionary parameters;
		#endregion

		#region Properties
		/// <summary>
		/// Gets the query parameters.
		/// </summary>
		/// <value>A dictionary of parameter instances.</value>
		public ParameterDictionary Parameters
		{
			get { return parameters; }
		}
		#endregion

		#region Construction
		/// <summary>
		/// Initializes a new default instance of the <see cref="ParameterSet"/> class.
		/// </summary>
		public ParameterSet()
			: this(new ParameterDictionary())
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="ParameterSet"/> class.
		/// </summary>
		/// <param name="parameters">The query parameters.</param>
		public ParameterSet(ParameterDictionary parameters)
		{
			this.parameters = parameters;
		}
		#endregion
	}
}
